import request from './request'
import {Md5} from 'ts-md5'

export const change_password = (old_password: string, new_password: string) => {
    const old_password_md5 = Md5.hashStr(old_password)
    const new_password_md5 = Md5.hashStr(new_password)
    return request({
        url: '/api/change-password',
        method: 'POST',
        data: {
            old_password: old_password_md5,
            new_password: new_password_md5
        }
    })
}